import { createApp } from "vue";
import App from "./App.vue";
import setupPlugins from "@/plugins";

// 本地SVG图标
import "virtual:svg-icons-register";
import Print from "vue3-print-nb";
// 样式
import "element-plus/theme-chalk/dark/css-vars.css";
// 暗黑模式自定义变量
import "@/styles/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";
import "animate.css";
// 自定义防抖指令

import { setupDebounceDirective } from "@/utils/debounce"; // 在此处引入指令
import SmoothScrollDirective from "@/utils/smoothScroll"; // 在此处引入指令
import noSpace from "@/utils/noSpace"; // 在此处引入指令
import { initRem } from "@/utils/remUtils";
// 初始化 rem 适配
initRem();
const app = createApp(App);
setupDebounceDirective(app);

app.directive("noSpace", noSpace);
app.directive("smooth-scroll", SmoothScrollDirective);

// 注册插件
app.use(setupPlugins).use(Print);
app.mount("#app");
